package com.itheima.xinxi.system.controller;

import com.itheima.xinxi.system.domain.Student;
import com.itheima.xinxi.system.service.StudentService;

import java.util.Scanner;

/**
 * 学生用户交互类
 */
public class OtherStudentController extends BaseStudentController {
    private Scanner sc = new Scanner(System.in);
    //获取学生数据
    public Student getStudent(String id) {
        System.out.println("请输入姓名");
        //姓名
        String name = sc.next();
        System.out.println("请输入年龄");
        //年龄
        int age = sc.nextInt();
        System.out.println("请输入生日");
        //生日
        String birthday = sc.next();
        //封装数据
        Student student = new Student(id, name, age, birthday);

        return student;
    }


}
